// Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
// This file is part of Checkmk (https://checkmk.com). It is subject to the
// terms and conditions defined in the file COPYING, which is part of this
// source code package.

#ifndef DynamicColumn_h
#define DynamicColumn_h

#include <memory>
#include <string>
#include <utility>

#include "livestatus/Column.h"

class ICore;

class DynamicColumn {
public:
    DynamicColumn(std::string name, std::string description,
                  ColumnOffsets offsets)
        : _name(std::move(name))
        , _description(std::move(description))
        , _offsets(std::move(offsets)) {}
    virtual ~DynamicColumn() = default;

    [[nodiscard]] std::string name() const { return _name; };

    virtual std::unique_ptr<Column> createColumn(const std::string &name,
                                                 const std::string &arguments,
                                                 const ICore &core) = 0;

protected:
    const std::string _name;
    const std::string _description;  // Note: Currently unused!
    ColumnOffsets _offsets;
};

#endif  // DynamicColumn_h
